Method for connection between communication networks of different types and gateway apparatus

ABSTRACT

A gateway apparatus for conducting connection between different types of communication networks, that are a line-switched network and a packet-switched network, there are provided a method and an apparatus in which sound breaks otherwise caused by delay or loss of speech encoded data is eliminated and deterioration of the speech quality is minimized to assure short delay in speech communication. A speech data processing circuit of the gateway apparatus compares the number of speech encoded data actually acquired with an expected value. The speech data processing circuit packetizes the so generated speech encoded data, along with the speech encoded data, to send the packetized data from a transmission circuit to the packet-switched network. The resulting data is sent from a data multiplexing circuit and a line-switched network terminating circuit to the line-switched network.

TECHNICAL FIELD

This invention relates to methods and apparatus for processing encodeddata. More particularly, this invention relates to methods and apparatususable with advantage for processing encoded data by a gateway apparatusfor conducting connection between communication networks of differenttypes represented by line-switched networks and packet-switchednetworks, such as IP networks.

BACKGROUND ART

The connection between a line-switched network and a packet-switchednetwork such as IP (Internet Protocol), for conducting bidirectionalcommunication, is implemented by a gateway apparatus which is forconverting a variety of data, such as control information, imageencoding information or speech encoding information which are based onthe data format of one of the communication networks, into the dataformat of the other communication network. In this case, the data,including the information of various sorts, is subjected to conversiononly of a communication protocol, or to transcoder processing forenabling connection under different encoding systems, as necessary. Insuch case, insofar as the speech encoded data is concerned, inparticular, such a processing method is required in which it is possibleto maintain not only the speech quality but also the communication withshort delay.

FIG. 11 shows an example of a typical configuration of a conventionalgateway apparatus. Referring to FIG. 11, for the direction from aline-switched network to a packet-switched network, data containing theencoded speech information, along with the control information and theencoded image information is multiplexed with a fixed word length andsupplied from a line-switched network terminating circuit 100 that isfor terminating the line-switched network. The multiplexed data issupplied with a preset period to a multiplexed data demultiplexingcircuit 200. This multiplexed data demultiplexing circuit 200 performsprocessing in accordance with a preset period managed by a first timercircuit 1000. On receipt of a processing start request signal, outputfrom the first timer circuit 1000, the multiplexed data demultiplexingcircuit detects a unique word, which is an identifier used forseparating multiplexed data from the line-switched network into controldata, image data and speech data. Based on the so detected unique word,the multiplexed data demultiplexing circuit performs demultiplexing ofthe multiplexed data. The data demultiplexed by the multiplexed datademultiplexing circuit 200, that is, the control data, image data andthe speech data, are supplied to a control data processing circuit 300,an image data processing circuit 400 and to a speech data processingcircuit 500, respectively. The data processing circuits 300, 400 and 500perform respective data processing operations and output the resultingdata to associated packet-switched network terminating circuits 600, 700and 800, respectively. The packet-switched network terminating circuits600, 700 and 800 output data received from the data processing circuits300, 400 and 500 to the packet-switched network, respectively.

On the other hand, for the direction of communication from thepacket-switched network to the line-switched network, the respectivepackets, containing the control information, image encoding informationand the speech encoding information, are received by the associatedpacket-switched network terminating circuits 600, 700 and 800,respectively. The control data, image encoded data and the speechencoded data are output to the control data processing circuit 300,image data processing circuit 400 and to the speech data processingcircuit 500, respectively. The data processing circuits 300, 400 and 500perform the processing operations which are the reverse of those fromthe line-switched network to the packet-switched network, and output theresulting data. A data multiplexing circuit 900 performs the processingin accordance with the preset period managed by the first timer circuit1000. On receipt of a processing start request signal, output from thefirst timer circuit 1000, the data multiplexing circuit 900 multiplexesthe data output from the data processing circuits 300, 400 and 500 tooutput the resulting demultiplexed data to the line-switched networkterminating circuit 100. The line-switched network terminating circuit100 sends the multiplexed data, obtained from the data multiplexingcircuit 900, to the line-switched network.

FIG. 12 shows an example of a typical configuration of the speech dataprocessing circuit 500 and the packet-switched network terminatingcircuit 800. Referring to FIG. 12, for the direction of communicationfrom the line-switched network to the packet-switched network, thespeech data processing circuit 500 converts the protocol of the speechencoded data, output from the multiplexed data demultiplexing circuit200, into that of packet data, in a packet data forming circuit 501.This packet data forming circuit 501 then outputs the resulting packetspeech data to a transmission circuit 801 within a packet-switchednetwork speech data terminating circuit 800. The transmission circuit801 sends out packet data to the packet-switched network.

Insofar as the direction from the packet-switched network to theline-switched network is concerned, a speech packet is received by areceiving circuit 802 of the packet-switched network speech dataterminating circuit 800 so as to be stored in a buffer, not shown,provided in the receiving circuit 802. In the speech data processingcircuit 500, a second timer circuit 511 is a circuit for outputting aprocessing start request to an encoded data extracting circuit 512. Theencoded data extracting circuit 512 acquires speech data from thereceiving circuit 802, at a time point the encoded data extractingcircuit 512 has received the processing start request from the secondtimer circuit 511, extracts the speech encoded data and outputs the soextracted speech encoded data to the data multiplexing circuit 900.

As a gateway apparatus for connecting different type communicationnetworks each other, there have so far been known apparatus of a varietyof configurations. For example, there is known a speech gatewayapparatus which has an exchanger interfacing unit and a packetcontroller and which is connected via an exchanger to a telephoneterminal and is connected to the IP network for speech communication(see for example the Patent Document 1 below).

There has also been known an error concealment technique in theencoding/decoding of moving images in which, when an error has occurredin transmitting an image sent by an encoder, the image data, which hasbecome unable to be decoded normally, is replaced with image data of ablock that has been decoded correctly by a decoder, in order to renderthe deterioration in the image quality less apparent. In this PatentDocument, error concealment control is executed by taking framecorrelation into account for improving the image quality (see forexample the Patent Document 2 below).

There are also known a variety of techniques for absorbing delayfluctuation. For example, there is known such technique in which, whenthe receiving time interval has become shorter than the transmittingtime interval, a reference packet for recovery wait control isdynamically changed to shorten the time until sending received packetsto recovery processing as propagation delay fluctuations are absorbed(see for example the Patent Document 3 below). There is also known aconfiguration of a media converting device including a telephone networkside interfacing circuit, connected to a telephone network, an IPnetwork side interfacing circuit, connected to the IP network, and aspeech packet processing circuit, in which the media converting deviceis connected to a media converting controlling circuit. In this mediaconverting device, the terminals connected in the same device areconnected without media conversion to decrease speech deterioration ortransmission delay (see for example the Patent Document 3 below).

There is furthermore known a receiving device for generating encodeddata when a packet from the network has been delayed. This receivingdevice includes data inserting means which, when a speech packet fromthe network is delayed such that original speech data to be output hasfailed to be assembled, inserts encoded speech data for prohibiting idletime into a continuous data portion of the original speech data whichcannot be assembled until arrival of the delayed speech packet. Thereceiving device further includes data discarding means which, when thedata inserting means has inserted the encoded speech data forprohibiting idle time, discards plural small-sized data portions,situated in a preset non-continuous location of the assembled originalspeech data and continuing for a time corresponding to a time intervalequivalent to the encoded speech data inserted by the data insertingmeans (see for example the Patent Document 5 below). Specifically, thePatent Document 5 shows a speech packet receiving apparatus intended toeliminate the problem that, if, in case underrun has occurred, delayedpackets that failed to be absorbed are discarded, and substitute speechdata are written in place of the delayed packet data, the amount ofdiscarded speech data may be increased in case the discarded speech dataare compressed encoded data, thus deteriorating the speech quality. Tothis end, the Patent Document discloses a speech packet receivingapparatus, in which the packets arriving from the network are decoded toPCM (Pulse Code Modulation) data and the resulting PCM data are outputat a preset transmission speed for lowering the deterioration in thespeech quality. The speech packet receiving apparatus includes anencoded speech buffer for absorbing the difference in the packetincoming time within an extent of not detracting from real-timeperformance, and a PCM level comparator for comparing whether or notdecoded PCM data is of a speech level close to silent data which doesnot affect the speech quality and which therefore may safely bediscarded. The speech packet receiving apparatus also includes adecimating counter controller which, when the substitute encoded PCMdata is inserted, discretely decimates an amount of nearly silent PCMdata corresponding to the amount of the decoded data of the insertedsubstitute data, at a preset time interval, based on the results ofcomparison by the PCM level comparator.

[Patent Document 1]

Japanese Patent Kokai Publication No. JP-P2002-290550A (page 4, FIG. 1)

[Patent Document 2]

Japanese Patent Kokai Publication No. JP-P2002-77922A (page 3, FIG. 1)

[Patent Document 3]

Japanese Patent Kokai Publication No. JP-P2002-185498A (pages 4-5, FIG.1)

[Patent Document 4]

Japanese Patent Kokai Publication No. JP-P2001-326724A (pages 4-5, FIG.1)

[Patent Document 5]

Japanese Patent Kokai Publication No. JP-P2000-124947A (pages 2-3, FIG.1)

DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention

Meanwhile, in the conventional gateway apparatus, described withreference to FIGS. 11 and 12, it is presupposed that not only the speechencoded data alone but also the speech encoded data multiplexed withcontrol data or image encoded data are supplied thereto from theline-switched network. Consequently, there is presented the problemthat, under certain situations, the data may be appreciably deterioratedin quality, or speech may be appreciably delayed.

For example, if an error has been inserted in, in particular, a uniqueword of a multiplexed data, on a transmission channel connecting fromthe line-switched network to the gateway apparatus, the unique wordcannot be detected in the processing by the multiplexed datademultiplexing circuit 200 of FIG. 11. Hence, the multiplexed datademultiplexing circuit 200 cannot take out speech encoded data properlyfrom the multiplexed data received from the line-switched network. Inthis case, the speech data processing circuit 500, receiving the datademultiplexed by the multiplexed data demultiplexing circuit 200, cannotextract desired speech encoded data, so that no speech encoded data canbe sent out to the counterpart communication network, that is, thepacket-switched network. The result is that speech packets are sent outto the packet-switched network with a delay from the normal timing ofsending the speech packets. In this case, a packet-switched network sideterminal, as a destination of transmission, cannot take up the delayfluctuations, which add to delay fluctuations in the packet-switchednetwork, thus producing sound breaks to deteriorate the speech quality.

As for the packet-switched network to the line-switched network, in casea buffer for taking up the delay fluctuations in the packet-switchednetwork is provided in, for example, the receiving circuit 802 orbetween the receiving circuit 802 and the speech data processing circuit500, as in Patent Documents 3 and 5, this buffer increases speech delaycaused between terminals of the two communication networks.

Accordingly, it is an object of the present invention to provide agateway apparatus for interconnecting communication networks ofdifferent types in which short delay in the call by speech, for example,may be maintained as deterioration in the signal quality is reduced to aminimum. It is another object of the present invention to a method inwhich, in the gateway apparatus, short delay in the call by speech, forexample, may be maintained as deterioration in the signal quality isreduced to a minimum.

For accomplishing the above objects, the present invention provides, inconnection with a gateway system conducting connection between aline-switched network and a packet-switched network of respectivedifferent types, a method for processing encoded data from at least oneof the line-switched network and the packet-switched network towards theother. Thus, in case encoded data from at least one of the line-switchednetwork and the packet-switched network has been delayed in arriving orlost, data for causing a destination terminal of transmission of theother network to execute error concealment processing is generated, orencoded data acquired is discarded, in order to proceed to send outencoded data. A gateway apparatus in one aspect of the presentinvention, in which the first communication network is a line-switchednetwork and the second communication network is a packet-switchednetwork, comprises first decision means for deciding on whether encodeddata from the line-switched network has been delayed in arrival or lost,and first control means for performing control, if the result of thedecision indicates that the encoded data has been delayed in arrival orlost, for deciding on whether encoded data for causing a destinationterminal of transmission of the packet-switched network to execute errorconcealment processing is to be generated or the encoded data acquiredis to be discarded.

A gateway apparatus in another aspect of the present invention includessecond decision means for determining whether encoded data from thepacket-switched network have been delayed in arriving or lost, andsecond control means for performing control, if the result of thedecision indicates that the encoded data from the line-switched networkhas been delayed in arrival or lost, for deciding on whether encodeddata is to be generated for causing a destination terminal oftransmission on the side of the line-switched network to execute errorconcealment processing, or the encoded data delayed in arrival is to bediscarded.

A gateway apparatus in a further aspect of the present inventionincludes first decision means for deciding on whether the encoded datafrom the line-switched network have been delayed in arrival or lost,first control means for performing control, if the result of decisionindicates that the encoded data from the line-switched network has beendelayed in arrival or lost, for deciding on whether data is to begenerated by error concealment processing, or the acquired encoded datais to be discarded, and first decoding means for decoding the encodeddata from the line-switched network, as processed by the first controlmeans, and for outputting the resulting decoded data. The gatewayapparatus also includes first encoding means for encoding the dataobtained from the error concealment processing from the first controlmeans and the decoded data from the first decoding means in accordancewith an encoding system different from the encoding system for theencoded data from the line-switched network.

A gateway apparatus in a further aspect of the present inventioncomprises second decision means for deciding on whether the encoded datafrom the packet-switched network have been delayed in arrival or lost,second control means for performing control, if the result of decisionindicates that the encoded data from the line-switched network has beendelayed in arrival or lost, for deciding on whether data is to begenerated by error concealment processing, or the acquired encoded datais to be discarded, and second decoding means for decoding the encodeddata from the packet-switched network, as processed by the secondcontrol means, and for outputting the resulting decoded data. Thegateway apparatus further includes second encoding means for encodingthe data obtained from the error concealment processing from the secondcontrol means and the decoded data from the second decoding means inaccordance with an encoding system different from the encoding systemfor the encoded data from the packet-switched network.

According to the present invention, preferably the first decision meanscompares the encoded data actually acquired per period from theline-switched network and a pre-calculated expected value, that is, thenumber of encoded data expected to be acquired per period, and gives adecision, based on the result of comparison, on whether the encoded datafrom the line-switched network have been delayed in arrival or lost.

According to the present invention, preferably the first decision meansincludes a first decision circuit for receiving and counting encodeddata output from a multiplexed data demultiplexing circuit,demultiplexing multiplexed data from the line-switched circuit. Thefirst decision circuit compares the number of encoded data acquired perperiod with an expected value, that is, the number of the encoded dataexpected to be output from the multiplexed data demultiplexing circuitper period, and outputs the encoded data received from the multiplexeddata demultiplexing circuit if the number of the encoded data acquiredis equal to the expected value. The first decision circuit outputs,along with the encoded data acquired from the multiplexed datademultiplexing circuit, a generation request signal for generating thedata in deficit in case the number of the encoded data acquired is lessthan the expected value, while outputting, along with the encoded dataacquired from the multiplexed data demultiplexing circuit, a discardingrequest signal for discarding the encoded data in excess if the numberof the encoded data acquired is less than the expected value.

According to the present invention, preferably the first control meansincludes a first selection circuit for receiving at least one of theencoded data, the generation request signal and the discarding requestsignal, output from the first decision circuit. The first selectioncircuit outputs, in case of receiving only the encoded data from thefirst decision circuit, the encoded data received, and issues a command,in case of receiving the generation request signal, for forming data indeficit, while discarding, in case of receipt of the discarding requestsignal, the encoded data in excess, indicated by the discarding requestsignal, out of the encoded data received, and for outputting remainingportions of the encoded data. The first control means also includes afirst encoded data generating circuit for generating encoded data forcausing a destination terminal of transmission to execute errorconcealment processing responsive to a command from the first selectioncircuit.

According to the present invention, preferably the second decision meanschecks whether or not packet data from the packet-switched network canbe acquired from a receiving circuit, every preset period, extracts theencoded data from the packet data in case the packet data has beenacquired from the receiving circuit and verifies that the encoded datahas been delayed in arrival or lost in case the packet data has failedto be acquired.

According to the present invention, preferably the second decision meansincludes a timer circuit for outputting a processing start requestsignal at a preset period, and an encoded data extraction circuit. Theencoded data extraction circuit attempts to get packet data from areceiving circuit receiving packet data from the packet-switchednetwork, at a time moment of receipt of a processing start requestsignal from the timer circuit or a re-acquisition request signal, andextracts encoded data from the packet data in case the trial has metwith success. The encoded data extraction circuit outputs a signal tothe effect that the packet data has failed to be acquired, in case theattempt for getting the packet data from the receiving circuit hasfailed.

The second decision means also includes a second decision circuit foroutputting a generation request signal for causing a destinationterminal of transmission to execute error concealment processing in casethe signal received from the encoded data extraction circuit is a signalto the effect that the packet data has failed to be acquired.

The second decision means outputs the encoded data received from theencoding circuit extracting circuit in case the encoded data extractedby the encoded data extraction circuit has been received and the encodeddata extraction circuit has not output the generation request signaljust before.

The second decision means outputs, along with encoded data, receivedthis time from the encoded data extraction circuit, a discarding requestsignal to the effect that the encoded data shall be discarded, if theresult of previous decision indicates that the encoded data extractioncircuit has output the generation request signal, and the encoded data,received this time, is the encoded data to be processed at an outputtiming of the generation request signal. The second decision means alsooutputs a re-acquisition signal for requesting again the encoded data tothe encoded data extraction circuit.

According to the present invention, preferably the second control meansincludes a second selection circuit for outputting encoded data in caseonly the encoded data has been received from the second decisioncircuit, for issuing a command to execute error concealment processingin case of receipt of the generation request signal from the seconddecision circuit, for deleting a relevant amount of the encoded datareceived from the second decision circuit in case of receiving thediscarding request signal from the second decision circuit, and foroutputting remaining portions of the encoded data, and a second encodeddata generating circuit responsive to the command for executing theerror concealment processing from the second selection circuit togenerate encoded data necessary for a terminal on the line-switchednetwork to carry out the error concealment processing.

According to the present invention, there may be provided a transcoderfunction. In this case, the first control means of the gateway apparatusincludes a first selection circuit for receiving at least one of theencoded data, the generation request signal and the discarding requestsignal, from the first decision circuit, for outputting, in case ofreceipt only of the encoded data from the first decision circuit, theencoded data received, for issuing a command for forming the data indeficit, in case of receipt of the generation request signal, and fordiscarding, in case of receipt of the discarding request signal, anumber of the encoded data received, indicated by the discarding requestsignal, and for outputting the remaining portions of the encoded data.The first control means also includes a first error concealmentprocessing circuit for receiving the command from the first selectioncircuit for generating data by error concealment processing. In thisconfiguration, there are provided a first decoding circuit for decodingencoded data from the line-switched network, processed by the firstselection circuit of the first control means, and for outputting decodeddata, and a first encoding circuit for encoding data obtained from thefirst decoding circuit and data obtained from the first errorconcealment processing circuit.

A gateway apparatus in a further aspect of the present invention mayinclude a transcoder function. In this case, the second control meansincludes a second selection circuit for outputting encoded data whenonly the encoded data has been received from the second decisioncircuit, for issuing a command for execution of error concealmentprocessing in case of receiving a generation request signal from thesecond decision circuit and for deleting only relevant portions of theencoded data received from the second decision circuit and outputtingremaining portions of the encoded data, and a second error concealmentprocessing circuit for generating data by error concealment processing.The second decoding means includes a second decoding circuit fordecoding encoded data from the packet-switched network, processed by thesecond selection circuit of the second control means, to output decodeddata, and a second encoding circuit for encoding and outputting dataobtained from the second decoding circuit and data obtained from thesecond error concealment processing circuit.

A method for processing encoded data in a further aspect of the presentinvention by a gateway apparatus for conducting connection between aline-switched network and a packet-switched network, comprises

(a1) a step of the gateway apparatus deciding whether encoded data fromthe line-switched network has been delayed in arrival or lost, and

(b1) a step of the gateway apparatus generating encoded data for causinga destination terminal of transmission to execute error concealmentprocessing or discarding encoded data acquired in case the result of thedecision indicates that data from the line-switched network has beendelayed in arrival or lost.

A method according to a further aspect of the present invention includes

(a2) a step of the gateway apparatus interconnecting communicationnetworks of respective different types, which are a line-switchednetwork and a packet-switched network, deciding on whether encoded datafrom the packet-switched network has been delayed in arrival or lost;and

(b2) a step of the gateway apparatus generating data for causing adestination terminal of transmission to execute error concealmentprocessing or discarding encoded data acquired in case the result of thedecision indicates that the encoded data from the packet-switchednetwork has been delayed in arrival or lost.

A method according to a further aspect of the present invention includes

(a1) a step of the gateway apparatus deciding on whether encoded datafrom the line-switched network has been delayed in arrival or lost, and

(b1) a step of the gateway apparatus generating data by errorconcealment processing or discarding encoded data acquired in case theresult of the decision indicates that the encoded data from theline-switched network has been delayed in arriving or lost,

(c1) a step of the gateway apparatus decoding encoded data from theline-switched network, processed in the step (b1) and outputting theresulting decoded data, and

(d1) a step of the gateway apparatus encoding the data obtained by theerror concealment processing and the decoded data in accordance with anencoding system different from that for encoded data from theline-switched network and outputting the resulting data.

A method according to a further aspect of the present invention includes

(a2) a step of the gateway apparatus deciding on whether encoded datafrom the packet-switched network has been delayed in arrival or lost;and

(b2) a step of the gateway apparatus generating data by errorconcealment processing or discarding encoded data delayed in arriving incase the result of the decision indicates that the encoded data from theline-switched network has been delayed in arrival or lost;

(c2) a step of the gateway apparatus decoding encoded data from thepacket-switched network, processed in the step (b2), and outputting theresulting decoded data; and

(d2) a step of the gateway apparatus encoding the data obtained by theerror concealment processing and the decoded data in accordance with anencoding system different from that for encoded data from thepacket-switched network, and outputting the resulting data.

In the method of the present invention, preferably the step (a1)includes:

(a11) a step of receiving and counting encoded data output from amultiplexed data demultiplexing circuit demultiplexing multiplexed datareceived from the line-switched network and comparing the number of theencoded data acquired per period with an expected value, that is, thenumber of encoded data expected to be output per period from themultiplexed data demultiplexing circuit, and

(a12) a step of outputting, if the result of comparison indicates thatthe number of the encoded data acquired is equal to the number of theexpected value, the encoded data received from the multiplexed datademultiplexing circuit,

outputting, if the result of comparison indicates that the number of theencoded data acquired is less than the number of the expected value, ageneration request signal for generating data in deficit, along with theencoded data acquired from the multiplexed data demultiplexing circuit,and

outputting, if the result of comparison indicates that the number of theencoded data acquired is greater than the number of the expected value,a discarding request signal for discarding the encoded data in excess,along with the encoded data acquired from the multiplexed datademultiplexing circuit.

In the method of the present invention, preferably the step (b1)includes:

(b11) a step of receiving the encoded data, the generation requestsignal or the discarding request signal, output from the step (a12),outputting, if the encoded data only is received, the encoded datareceived, issuing a command for forming data in deficit if thegeneration request signal is received, and discarding, if the discardingrequest signal is received, a number of the encoded data received,corresponding to the number indicated by the discarding request signal,and outputting the remaining portion of the encoded data; and

(b12) a step of generating, responsive to the command for forming thedata in deficit, the encoded data for causing a destination terminal oftransmission to execute the error concealment processing.

In the method of the present invention, the step (a2) includes:

(a21) a step of making a trial to get packet data from a receivingcircuit receiving packet data from the packet-switched network, at atime moment of receipt of a processing start request signal output froma timer circuit at a preset period, or a re-acquisition request signal,and

extracting the encoded data from the packet data if the trial has metwith success and outputting a signal to the effect that packet data hasfailed to be acquired if the attempt of acquiring packet data from thereceiving circuit has failed, by way of executing encoded dataextracting processing; and

(a22) a step of outputting a generation request signal for causing adestination terminal of transmission to execute error concealmentprocessing in case an output of the sub-step (a21) is the signal to theeffect that packet data has failed to be acquired, for receiving theencoded data output in the step (a21) and outputting the encoded dataoutput in the step (a21) if the generation request signal has failed tobe output right before. The step also outputs, if the result of previousdecision indicates that the generation request signal has already beenoutput in the sub-step (a21) and the encoded data output in the sub-step(a21) for the present is the encoded data which should be processed atan output timing of the generation request signal, the encoded signaland, together therewith, a discarding request signal indicating that theencoded data shall be discarded. The sub-step also outputs are-acquisition request signal for requesting again the encoded data tothe encoded data extracting processing of the sub-step (a21).

According to the present invention, preferably the sub-step (b2)includes:

(b21) a step of issuing a command for executing error concealmentprocessing if the generation request signal is output from the sub-step(a22), and deleting relevant portions of the encoded data output in thesub-step (a22), as the remaining portions of the encoded data is output,in case the discarding request signal has been output in the sub-step(a22), and

(b22) a step of generating encoded data necessary for a destination oftransmission of the line-switched network to execute error concealmentprocessing.

Meritorious Effect of the Invention

According to the present invention, speech packet data in excess is notsent to suppress delay at the destination of transmission, therebyachieving call by speech where short delay with minimum deterioration ofspeech quality is required.

The present invention contemplates to deal with the situation in whichthe balance of the number of the encoded data in a speech packetreceived from a packet-switched network and the periodic acquisition ofthe encoded data extraction processing is upset in connection with thestorage space in a buffer for taking up delay fluctuations in thepackets received from the packet-switched network. That is, when thebuffer has become depleted, speech encoded data is generated byprocessing for generating the encoded data, based on a signal to theeffect that packet data has failed to be acquired, and sent toprocessing for data multiplexing, in order for a terminal at thedestination of transmitted to execute error concealment processing,while the delayed speech packet data received are discarded, therebyachieving call by speech with short delay with minimum deterioration ofspeech quality.

Furthermore, according to the present invention, signal delay may besuppressed, while deterioration of the signal quality may be minimized,even in case the invention is applied to a transcoder function ofre-encoding input encoded data by another encoding system to output theresulting re-encoded data.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing the configuration of a gateway apparatusaccording to a first embodiment of the present invention.

FIG. 2 is a diagram showing the configuration relevant to processing ina direction from a line-switched network to a packet-switched network ina speech data processing circuit in the first embodiment of the presentinvention.

FIG. 3 is a diagram showing the configuration relevant to processing ina direction from the packet-switched network to the line-switchednetwork in the speech data processing circuit in the first embodiment ofthe present invention.

FIG. 4 is a flowchart for illustrating the processing for the directionfrom the line-switched network to the packet-switched network in thespeech data processing circuit in the first embodiment of the presentinvention.

FIG. 5 is a flowchart for illustrating the processing for the directionfrom the packet-switched network to the line-switched network in thespeech data processing circuit in the first embodiment of the presentinvention.

FIG. 6 is a diagram showing the configuration relevant to processing ina direction from a line-switched network to a packet-switched network ina speech data processing circuit in a second embodiment of the presentinvention.

FIG. 7 is a diagram showing the configuration relevant to processing ina direction from the packet-switched network to the line-switchednetwork in the speech data processing circuit in the second embodimentof the present invention.

FIG. 8 is a flowchart for illustrating the processing for the directionfrom the line-switched network to the packet-switched network in thespeech data processing circuit in the second embodiment of the presentinvention.

FIG. 9 is a flowchart for illustrating the processing for the directionfrom the packet-switched network to the line-switched network in thespeech data processing circuit in the second embodiment of the presentinvention.

FIG. 10 is a diagram showing the configuration of a gateway apparatusaccording to a third embodiment of the present invention.

FIG. 11 is a diagram showing the configuration of a conventional gatewayapparatus.

FIG. 12 is a diagram showing a typical conventional speech processingcircuit.

EXPLANATION OF NUMERALS

-   100 line-switched network terminating circuit-   200 multiplexed data demultiplexing circuit-   300 control data processing circuit-   400 image data processing circuit-   500 speech data processing circuit-   501 packet data forming circuit-   502 first decision circuit-   503 first selection circuit-   504 first encoded data generating circuit-   505 first error concealment processing circuit-   506 first decoding circuit-   507 first encoding circuit-   511 second timer circuit-   512 encoded data extracting circuit-   513 second decision circuit-   514 second selection circuit-   515 second encoding data generating circuit-   516 second error concealment processing circuit-   517 second decoding circuit-   518 second encoding circuit-   550, 560 speech data processing circuit-   600 packet-switched network control data terminating circuit-   700 packet-switched network image data terminating circuit-   800 packet-switched network speech data terminating circuit-   801 transmission circuit-   802 receiving circuit-   900 multiplexed data demultiplexing circuit-   1000 first timer circuit

PREFERRED EMBODIMENTS OF THE INVENTION

The present invention will now be described in detail with reference topreferred embodiments shown in the drawings. In the direction from theline-switched network to the packet-switched network, a gatewayapparatus for connecting the line-switched network and thepacket-switched network each other, in a preferred embodiment of thepresent invention, compares the number of speech encoded data actuallyacquired per a preset period from a multiplexed data demultiplexingcircuit (200) which operates at a preset period, with an expected valueof the number of the speech encoded data. This expected value is thenumber of encoded data expected to be output from the multiplexed datademultiplexing circuit (200) per period, and is calculated from theperiod and the frame time duration of the speech encoding system. Basedon the result of comparison, suitable decision processing is carried outand, based on the result of decision, processing for generating encodeddata or discarding the encoded data is carried out to make number of thepacket data sent out per period constant, thereby minimizing thedeterioration of the signal quality at the destination terminal andmaking it possible to maintain short delay in speech communication. Insimilar manner, in the direction from the packet-switched networktowards the line-switched network, if a packet is delayed in arriving,due to delay fluctuations in the packet-switched network, a signal tothe effect that packet data has failed to be acquired is output in aprocess of extracting encoded data from received packet data. Based onan output from the processing of extracting encoded data, a properdecision is given and, based on the result of the decision, theprocessing for generating encoded data or that for discarding theencoded data is carried out. In more detail, a gateway apparatus forconducting connection between a line-switched network and apacket-switched network, according to an embodiment of the presentinvention, includes a multiplexed data demultiplexing circuit (200) fordemultiplexing multiplexed data from the line-switched network, a dataprocessing circuit (550), and a transmission circuit (801). The dataprocessing circuit packetizes the encoded data demultiplexed by themultiplexed data demultiplexing circuit, and outputting the resultingpacket data, and the transmission circuit transmits the packet dataoutput from the data processing circuit to the packet-switched network.

Referring to FIG. 2, the data processing circuit (550) in a firstembodiment of the present invention includes a packet data formingcircuit (501), a first decision circuit (502), a first selection circuit(503) and a first encoded data generating circuit (504).

The first decision circuit (502) receives and counts encoded data outputfrom the multiplexed data demultiplexing circuit (200). The firstdecision circuit then compares the number of the encoded data, acquiredfor a preset period, with an expected value, that is, the number of theencoded data expected to be output from the multiplexed datademultiplexing circuit (200) for the above period. Based on the resultof the comparison, the following processing is performed:

-   -   if the number of the encoded data acquired is equal to the        expected value, the encoded data received from the multiplexed        data demultiplexing circuit is output;    -   if the number the encoded data acquired is less than the above        expected value, a generation request signal for generating data        in deficit is output; and    -   if the number the encoded data acquired is greater than the        above expected value, a discarding request signal for discarding        the encoded data in excess is output.

A first selection circuit (503) receives at least one of the encodeddata, the generation request signal and the discarding request signal,output from the first decision circuit (502), and performs control (I)to (III) below, based on the received signal.

(I) In case the first selection circuit (503) has received only theencoded data from the first decision circuit (502), the first selectioncircuit outputs the encoded data received.

(II) In case the first selection circuit (503) has received thegeneration request signal from the first decision circuit (502), thefirst selection circuit issues a command to generate encoded data indeficit.

(III) In case the first selection circuit (503) has received thediscarding request signal from the first decision circuit (502), thefirst selection circuit discards a number of the received encoded datacorresponding to the number indicated by the discarding request signal,and outputs the remaining portions of the encoded data.

Responsive to the command from the first selection circuit (503), thefirst encoded data generating circuit (504) generates encoded data forhaving the processing of error concealment executed by a destinationterminal of transmission on the packet-switched network side.

The packet data forming circuit (501) receives encoded data output fromthe first selection circuit (503) or encoded data output from the firstencoded data generating circuit (504) to convert the data into data ofthe packet data format.

Referring to FIG. 3, a data processing circuit (550) in an embodiment ofthe present invention includes a second timer circuit (511), an encodeddata extracting circuit (512), a second decision circuit (513), a secondselection circuit (514) and a second encoded data extracting circuit(515).

The second timer circuit (511) outputs a processing start request signalat a preset period. At a time point of receipt of a processing startrequest signal from the second timer circuit (511), or a re-acquisitionrequest signal, the encoded data extracting circuit (512) makes a trialto obtain packet data from the receiving circuit (802). If the trial hasmet with success, the encoded data is extracted from the packet data. Ifthe trial to obtain packet data from the receiving circuit has failed, asignal to the effect that the trial to obtain packet data has failed isoutput.

The second decision circuit (513) receives the encoded data extractedfrom the encoded data extracting circuit (512), or the signal to theeffect that the trial to obtain packet data has failed, output from theencoded data extracting circuit. Based on the signals received, thesecond decision circuit performs the following control (I) to (III):

(I) In case the second decision circuit (513) has received from theencoded data extracting circuit (512) the signal to the effect that thetrial to obtain packet data acquisition has failed, the second decisioncircuit outputs a generation request signal in order for a destinationterminal of the line-switched network to carry out the error concealmentprocessing.

(II) In case the second decision circuit (513) has received from theencoded data extracting circuit (512) the encoded data and the encodeddata extracting circuit (512) has output no generation request signaljust before, the second decision circuit outputs the encoded datareceived from the encoded data extracting circuit (512).

(III) If, as a result of previous decision, the encoded data extractingcircuit (512) has output the generation request signal, and the encodeddata, received for the present from the encoded data extracting circuit(512) is the encoded data to be processed at an output timing of thegeneration request signal, the second decision circuit (513) outputs theencoded data and, together therewith, a discarding request signal to theeffect that the encoded data shall be discarded. Furthermore, the seconddecision circuit outputs a re-acquisition signal, for requesting theencoded data again, to the encoded data extracting circuit (512).

The second selection circuit (514) receives the encoded data, generationrequest signal or the discarding request signal, from the seconddecision circuit (513). In case the signal received is the generationrequest signal, the second selection circuit commands encoded datanecessary to carry out the error concealment processing. In case thesignal received is the discarding signal, the encoded data is discarded.

The second encoded data extracting circuit (515) generates encoded datanecessary for a line-switched network side terminal to carry out errorconcealment processing. The encoded data generated by the secondselection circuit (514) or the second encoded data extracting circuit(515) is sent out via data multiplexing circuit (900) to theline-switched network.

The present invention is similarly applicable to a gateway apparatushaving the function of a transcoder receiving data encoded in forexample a first encoding system and outputting encoded data re-encodedin accordance with a second encoding system, as will be described in thefollowing embodiments.

EMBODIMENTS

Preferred embodiments of the present invention will now be describedwith reference to the drawings. FIG. 1 is a diagram showing theconfiguration of a first embodiment of the present invention. In FIG. 1,there is shown the configuration of a gateway apparatus of the presentembodiment used for interconnecting the line-switched network and thepacket-switched network. In FIG. 1, the elements which are the same asor similar to those shown in FIG. 11 are indicated by the same referencenumerals. Referring to FIG. 1, the gateway apparatus of the presentembodiment includes a line-switched network terminating circuit 100, amultiplexed data demultiplexing circuit 200, a data multiplexing circuit900, a first timer circuit 1000, a control data processing circuit 300,a packet-switched network terminating circuit 600, an image dataprocessing circuit 400, and a packet-switched network terminatingcircuit 700. The gateway apparatus also includes a speech dataprocessing circuit 550 and a packet-switched network terminating circuit800. The speech data processing circuit 550 of the present embodiment isdifferent from the conventional speech data processing circuit 500,shown in FIG. 11, in that the speech data processing circuit 550includes the functions of inserting and discarding packets. Meanwhile,the input/output data formats of the speech data processing circuit 550are the same as those of conventional system shown in FIG. 11. It isnoted that the following explanation will be centered about the speechdata processing circuit 550 having the inserting and discardingfunctions, and the explanation of the same components as those of FIG.11 is omitted from time to time.

It is assumed that data multiplexed from speech data, image data andcontrol data, each of a preset length, are sent from the line-switchednetwork terminating circuit 100. The multiplexed data are demultiplexedinto the control data, image data and speech data, by the multiplexeddata demultiplexing circuit 200, with a period managed by the firsttimer circuit 1000. The multiplexed data demultiplexing circuit 200sends the demultiplexed control, image and speech data to the controldata processing circuit 300, image data processing circuit 400 and tothe speech data processing circuit 550, respectively. The dataprocessing circuits 300, 400 and 550 process the data received andoutput the processed data to the associated packet-switched networkterminating circuits 600, 700 and 800, respectively. The packet-switchednetwork terminating circuits 600, 700 and 800 packetize data receivedfrom the data processing circuits 300, 400 and 550 to send the resultingpacketized data to the packet-switched network. The above-describedsequence of operations is carried out on multiplexed data received fromthe line-switched network.

In the direction from the packet-switched network to the line-switchednetwork, the packet-switched network terminating circuits 600, 700 and800 receive the packets containing the control information, encodedimage information and the encoded speech information, respectively. Thecontrol data, image encoded data and the speech encoded data are sent tothe control data processing circuit 300, image data processing circuit400 and to the speech data processing circuit 550, respectively. Thecontrol data processing circuit 300, image data processing circuit 400and the speech data processing circuit 550 perform the processing ofconversion which is the reverse of the processing from the line-switchednetwork to the packet-switched network, and send processed result datato the data multiplexing circuit 900. The data multiplexing circuit 900multiplexes the data output from the control data processing circuit300, image data processing circuit 400 and the speech data processingcircuit 550, in accordance with a constant period managed by the firsttimer circuit 1000, and outputs the resulting multiplexed data to theline-switched network terminating circuit 100. The line-switched networkterminating circuit 100 sends the multiplexed data, received from thedata multiplexing circuit 900, to the line-switched network.

FIGS. 2 and 3 show two examples of the configuration of the speech dataprocessing circuit 550 of FIG. 1. Referring to FIG. 2, the speech dataprocessing circuit 550 includes, in the direction from the line-switchednetwork to the packet-switched network, a packet data forming circuit501, a first decision circuit 502, a first selection circuit 503 and afirst encoded data generating circuit 504.

The first decision circuit 502 acquires speech encoded data, output at aconstant period from the multiplexed data demultiplexing circuit 200,and repeatedly counts the number acquired of the speech encoded data atevery period. The first decision circuit 502 pre-calculates a value ofthe number of the speech encoded data, expected to be output per periodfrom the multiplexed data demultiplexing circuit 200, based on theperiod and the frame time duration of the speech encoding system, andholds the so pre-calculated value in a storage device, not shown. Thefirst decision circuit 502 compares the number of the speech encodeddata acquired with the number expected to be output per period from themultiplexed data demultiplexing circuit 200 (expected value). If theresult of comparison indicates that the two values are equal, all of thespeech encoded data are output to the packet data forming circuit 501.If the number of the speech encoded data received per period from themultiplexed data demultiplexing circuit 200 is less than thepre-calculated expected value, the first decision circuit 502 outputs ageneration request signal, for generating the number of the encoded datain deficit by the encoded data generating circuit 504, along with thespeech encoded data acquired. If the number of the speech encoded datareceived per period from the multiplexed data demultiplexing circuit 200is greater than the expected value, the first decision circuit 502manages control for outputting, along with the speech encoded dataacquired, a discarding request signal for discarding the speech encodeddata in excess.

The first selection circuit 503 receives the speech encoded data,generation request signal and the discarding request signal, from thefirst decision circuit 502, and changes over the processing, dependingon the information received, to output the speech encoded data to thepacket data forming circuit 501.

The first encoded data generating circuit 504 generates speech encodeddata, needed for a destination terminal of transmission, not shown, onthe packet-switched network side, to execute error concealmentprocessing, and outputs the so generated speech encoded data to thepacket data forming circuit 501. The packet data forming circuit 501converts the speech encoded data into data of the packet data formats,which data is then sent to the transmission circuit 801.

Referring to FIG. 3, the speech data processing circuit 550 includes, ina direction from the packet-switched network to the line-switchednetwork, a second timer circuit 511, an encoded data extracting circuit512, a second decision circuit 513, and a second encoded data extractingcircuit 515.

The second timer circuit 511 outputs a processing start request signalat a constant period. At a time point of receipt of the processing startrequest signal from the second timer circuit 511 or the re-acquisitionrequest signal from the second decision circuit 513, the encoded dataextracting circuit 512 makes a trial to obtain speech data from thereceiving circuit 802, which receives speech packets. If the trial hasmet with success, the encoded data extracting circuit 512 makes a trialto obtain speech data from the receiving circuit 802 which receivesspeech packets. If the trial has met with success, the encoded dataextracting circuit extracts speech encoded data from the speech data. Ifconversely the trial to obtain speech data from the receiving circuit802 has failed, the encoded data extracting circuit outputs a signalindicating that packet data acquisition has failed to be acquired. Thesecond decision circuit 513 receives speech encoded data acquired fromthe encoded data extracting circuit 512 or the signal indicating thatpacket data acquisition has failed. In case the signal received is thesignal indicating that packet data acquisition has failed, the seconddecision circuit 513 outputs a generation request signal for selectingthe second encoded data extracting circuit 515 in order for a terminalon the line-switched network to carry out the error concealmentprocessing. In case the signal received is the speech encoded data, andthe generation request signal has not been output just before, thesecond decision circuit 513 outputs the encoded speech signals to thesecond selection circuit 514. In case the generation request signal hasbeen output at the time of previous decision, and the speech encodeddata, acquired for the present time, is the encoded data which should beprocessed at the request signal outputting timing, the second decisioncircuit 513 outputs, along with the speech encoded data, the discardingrequest signal to the effect that the speech encoded data is to bediscarded, to the second selection circuit 514. The second decisioncircuit 513 outputs a re-acquisition request signal to the encoded dataextracting circuit 512 for requesting speech encoded data again. Thesecond encoded data extracting circuit 515 outputs speech encoded datanecessary for a terminal of the line-switched network to carry outspeech concealment processing.

The operation in the speech data processing circuit 550, in thedirection from the line-switched network to the packet-switched network,will now be described. In FIG. 11, the first timer circuit 1000 outputsa processing start request signal at a constant time period. Themultiplexed data demultiplexing circuit 200 performs processing at aconstant period managed by the first timer circuit 1000. Specifically,on receipt of the processing start request signal, output from the firsttimer circuit 1000, the multiplexed data demultiplexing circuit 200performs the processing of detecting a unique word and demultiplexinginto control data, image data and speech data, from the signal, receivedfrom the line-switched network terminating circuit 100 and outputsspeech encoded data.

FIG. 4 is a flowchart for illustrating the operation for processingencoded data in the direction from the line-switched network to thepacket-switched network in the speech data processing circuit 550 in theembodiment shown in FIG. 2. The first decision circuit 502 is in astandby state until data is output from the multiplexed datademultiplexing circuit 200 (step S1). When the standby state is released(step S2), the first decision circuit receives the speech encoded dataoutput from the multiplexed data demultiplexing circuit 200. The firstdecision circuit 502 counts up the number acquired per period (step S3).

From the period and the frame time duration of the speech encodingsystem, the first decision circuit 502 calculates the number of thespeech encoded data, expected to be output from the multiplexed datademultiplexing circuit 200 per period (expected value). The number ofthe speech encoded data, expected to be output from the multiplexed datademultiplexing circuit 200 per period, is compared to the number of thespeech encoded data actually acquired (step S4).

If the result of comparison indicates that the two numbers coincide witheach other, the first decision circuit 502 outputs all of the speechencoded data per period, received from the multiplexed datademultiplexing circuit 200, to the first selection circuit 503.

If, in the first decision circuit 502, the number of the speech encodeddata as counted per period is less than the number of the speech encodeddata expected to be output from the multiplexed data demultiplexingcircuit 200 per period (expected value), a generation request signal,indicating that a number equal to the number of the speech encoded datain deficit (=expected value−number actually acquired) is to be generatedin the first encoded data generating circuit 504, is delivered to thefirst selection circuit 503 along with the speech encoded data actuallyacquired (step S6). The generation request signal is output for a casethe number of the speech encoded data as counted per period is less thanthe expected value from the consideration that, in such case, themultiplexed data has failed to be properly demultiplexed in themultiplexed data demultiplexing circuit 200, or the speech data hasfailed to be demultiplexed at the timing concerned due to increase in anamount of data other than the speech encoded data.

If, in the first decision circuit 502, the number of the speech encodeddata counted per period exceeds the number of the speech encoded dataexpected to be output from the multiplexed data demultiplexing circuit200 per period (expected value), the first decision circuit sends adiscarding request signal to the first selection circuit 503, along withthe speech encoded data actually acquired (step S7). The discardingrequest signal indicates that the amount of the speech encoded data inexcess (=number actually acquired−expected value) shall be discarded.

The first selection circuit 503 receives the speech encoded data outputfrom the first decision circuit 502 or, together therewith, thegeneration request signal or the discarding request signal as the casemay be. In case only the speech encoded data has been delivered from thefirst decision circuit 502 to the first selection circuit 503 (branchingto ‘acquisition only of encoded data’ in a step S5), the first selectioncircuit 503 outputs all of the speech encoded data to the packet dataforming circuit 501.

When the generation request signal has been supplied, along with thespeech encoded data, from the first decision circuit 502 to the firstselection circuit 503 (branching to ‘acquisition of the generationrequest signal’ in the step S5), the first selection circuit 503 causesthe first encoded data generating circuit 504 to generate a number ofthe speech encoded data indicated by the generation request signal, tosend the speech encoded data from the first decision circuit 502 and thespeech data generated by the first encoded data generating circuit 504to the packet data forming circuit 501 (step S9). The first encoded datagenerating circuit 504 generates speech encoded data for the destinationterminal of transmission to execute error concealment processing.

When the first selection circuit 503 has acquired the discarding requestsignal, along with the speech encoded data, from the first decisioncircuit 502 (branching to ‘acquisition of discarding request signal’ inthe step S5), the first selection circuit 503 discards a number of thespeech encoded data indicated by the discarding request signal, out ofthe speech encoded data received and outputs the remaining portions ofthe speech encoded data to the packet data forming circuit 501 (stepS10).

The packet data forming circuit 501 performs protocol conversion of thespeech encoded data, output from the first selection circuit 503, intodata of packet data format and outputs the resulting data to thepacket-switched network terminating circuit 800 (step S8).

As a result of the above-described sequence of operations, a number ofthe packet data, which is in accord with the operating period, are sentout from the transmission circuit 801.

The operation for the direction from the packet-switched network to theline-switched network will now be described. It is assumed that speechpackets are received by the receiving circuit 802 of the packet-switchednetwork terminating circuit 800, from the packet-switched network (seeFIG. 3), and a preset number of the speech packets are stored in abuffer for taking up the delay fluctuations to a certain extent, afterwhich processing start request signals start to be output at a presetperiod from the second timer circuit 511.

FIG. 5 is a flowchart for illustrating the operation of processingencoded data, in the speech data processing circuit 550 of the presentembodiment shown in FIG. 3, in the direction from the packet-switchednetwork to the line-switched network.

At a time point when the processing start request signal from the secondtimer circuit 511, or the re-acquisition request signal from the seconddecision circuit 513, has been acquired, the encoded data extractingcircuit 512 makes a trial to obtain suitable speech data from thereceiving circuit 802 (steps S11 to S13).

If, in the encoded data extracting circuit 512, the trial to obtain thesuitable speech data from the receiving circuit 802 has met withsuccess, the speech encoded data is extracted from the speech data, andthe so extracted data is output (step S15).

If conversely the trial to obtain suitable speech data from thereceiving circuit 802 has failed, such that speech data has failed to beobtained, the encoded data extracting circuit 512 outputs to the seconddecision circuit 513 a signal indicating that acquisition of speechencoded data has failed (step S16).

The second decision circuit 513 receives the encoded speech signal,output from the encoded data extracting circuit 512, or a signalindicating that acquisition of the encoded speech signal has failed.

In case the signal received from the encoded data extracting circuit 512is a signal indicating that acquisition of the encoded speech signal hasfailed (NO of step S17), the second decision circuit 513, acting on thejudgment that the input-output number balance in the buffer held by thereceiving circuit 802 has been upset due to delay fluctuations in thepacket-switched network, or packet loss has occurred in thepacket-switched network, such that suitable speech data has failed to beacquired, outputs a generation request signal (step S19). Thisgeneration request signal indicates that the second encoded dataextracting circuit 515 shall be selected in order for the terminal, notshown, on the communication network of the destination of transmission,herein the line-switched network, to execute error concealmentprocessing (step S19).

In case the data received from the encoded data extracting circuit 512is speech encoded data and no generation request signal has been outputjust before, the second decision circuit 513 does not receive the signalto the effect that acquisition of the speech encoded data has failed. Incase the acquisition of the speech encoded data has met with success(YES branching of the step S17), the second decision circuit outputs thespeech encoded data to the second selection circuit 514.

In case the generation request signal has been output at the time ofprevious decision (YES branch of the step S18), and the speech encodeddata received for the present time is the speech encoded data whichshould inherently be processed at an output timing of the generationrequest signal, the second decision circuit 513 discards the encodedspeech signal. The second decision circuit outputs a re-acquisitionrequest signal to the encoded data extracting circuit 512 in order tomake a request for speech encoded data a second time (step S20).

In the present embodiment, it is necessary to avoid such a case in whichthe discarding request signal and the re-acquisition request signal aregenerated alternately in a repeated fashion thus leading to continuousoutputting of the data from the second encoded data extracting circuit515 to the data multiplexing circuit 900. Thus, the second decisioncircuit 513 includes a resetting function for avoiding this case fromoccurring.

The second selection circuit 514 acquires the speech encoded data or thegeneration request signal, supplied from the second decision circuit513. In case the signal received from the second decision circuit 513 isthe generation request signal, the second selection circuit 514 selectsthe second encoded data extracting circuit 515, so that the speechencoded data, generated by the second encoded data extracting circuit515, is output to the data multiplexing circuit (step S22).

If conversely the encoded speech signal has been received, the secondselection circuit 514 selects the processing of outputting the speechencoded data to the data multiplexing circuit 900 (step S23).

The second encoded data extracting circuit 515 generates encoded datafor causing a destination terminal of transmission on the line-switchednetwork side, not shown, to execute error concealment processing.

As a result of the above-described sequence of operations, acceptablespeech delay may be maintained of the multiplexed data, sent out overthe data multiplexing circuit 900 and the first timer circuit 1000, asthe deterioration in the speech quality is suppressed to a minimum. Itshould be noted that the configuration of the speech data processingcircuit 550 is merely illustrative and any suitable configuration otherthan that described above may be used provided that it is capable ofachieving equivalent processing.

The above-described embodiment refers to a case where thepacket-switched network and the line-switched network use the samespeech encoding system. However, the present invention may be applied toa case where the packet-switched network and the line-switched networkuse different speech encoding systems.

The case where the packet-switched network and the line-switched networkuse different speech encoding systems will now be described by way of asecond embodiment of the present invention. The present embodimentincludes a speech data processing circuit 560 in place of the speechdata processing circuit 550 in FIG. 1.

FIGS. 6 and 7 are diagrams showing the configurations of the speech dataprocessing circuit 560 in the second embodiment of the presentinvention.

Referring to FIG. 6, the speech data processing circuit 560 for the casewhere the packet-switched network and the line-switched network usedifferent speech encoding systems includes, in a direction from thepacket-switched network to the line-switched network, a packet dataforming circuit 501, a first decision circuit 502, a first selectioncircuit 503, a first error concealment circuit 505, a first decodingcircuit 506 and a first encoding circuit 507.

On receipt of the speech encoded data from the multiplexed datademultiplexing circuit 200, the first decision circuit 502 counts thenumber of the speech encoded data and calculates the acquired number ofthe speech encoded data output at every period. The first decisioncircuit compares the so calculated number to the number of the speechencoded data expected to be output from the multiplexed datademultiplexing circuit 200 per period in accordance with the period andthe speech encoding system. It should be noted that this number of thespeech encoded data expected is the expected value pre-calculated andstored. In case the acquired number of the speech encoded data outputper period is coincident with the expected value, all of the speechencoded data, output from the multiplexed data demultiplexing circuit200 per period, are output to the first selection circuit 503. In theacquired number of the speech encoded data output per period is lessthan the expected value, the first decision circuit outputs to the firstselection circuit 503 the speech encoded data actually acquired and,together with it, a generation request signal to the effect that anumber in deficit of the speech PCM data shall be generated in the firsterror concealment circuit 505. In the acquired number of the speechencoded data output per period exceeds the expected value, the firstdecision circuit outputs a discarding request signal to the effect thatthe number of the speech encoded data in excess shall be discarded, tothe first selection circuit 503, along with the speech encoded dataactually acquired.

On receipt of the generation request signal, along with the speechencoded data, from the first decision circuit 502, the first selectioncircuit 503 causes a number of speech PCM data equal to the numberindicated by the generation request signal to be generated by the firsterror concealment circuit 505. On receipt of the discarding requestsignal, along with the speech encoded data, from the first decisioncircuit 502, the first selection circuit 503 discards a number of thespeech encoded data corresponding to the number indicated by thediscarding request signal, and sends only the speech encoded data, leftover, to the first decoding circuit 506.

The first decoding circuit 506 decodes the speech encoded data, suppliedform the first selection circuit 503, to output the speech PCM data.

The first error concealment circuit 505 outputs the speech PCM data byerror concealment processing.

The first encoding circuit 507 acquires the speech PCM data from thefirst decoding circuit 506 and the first error concealment circuit 505and encodes the data in accordance with a different encoding system tooutput the resulting encoded data.

The packet data forming circuit 501 converts the speech encoded data,output from the first encoding circuit 507, into data of the packet dataformat, by way of protocol conversion, to output the resulting packetdata to the packet-switched network terminating circuit 800.

Referring to FIG. 7, the speech data processing circuit 560 includes, inthe direction from the packet-switched network to the line-switchednetwork, a second timer circuit 511, an encoded data extracting circuit512, a second decision circuit 513, a second error concealmentprocessing circuit 516, a second decoding circuit 517 and a secondencoding circuit 518, and fulfils a transcoder processing function.

The second timer circuit 511 outputs a processing start request signalat a constant period.

On receipt of the processing start request signal from the second timercircuit 511, or the re-acquisition signal from the second decisioncircuit 513, the encoded data extracting circuit 512 makes a trial toget suitable speech data from the receiving circuit 802. If the trialhas met with success, the encoded data extracting circuit extracts theencoded data to output the so extracted data. If the trial in acquiringthe speech data has failed, the encoded data extracting circuit outputsa signal to the effect that the trial for acquisition has failed.

On receipt of the signal from the encoded data extracting circuit 512 tothe effect that acquisition has failed, the second decision circuit 513outputs a generation request signal of selecting the second errorconcealment processing circuit 516. In case the data received from theencoded data extracting circuit 512 is the speech encoded data, and nogeneration request signal has been output just before, the seconddecision circuit 513 outputs the speech encoded data to the secondselection circuit 514. In case the generation request signal has beenoutput at the time of a directly previous decision, and the presentlyacquired speech encoded data is the encoded data which should have beenprocessed at an output timing of the generation request signal, thesecond decision circuit 513 outputs to the second selection circuit 514the speech encoded data and, together with it, a discarding requestsignal to the effect that the encoded speech signal shall be discarded.The second decision circuit outputs a re-acquisition signal to theencoded data extracting circuit 512 in order to request speech encodeddata again.

In case of receipt of the generation request signal from the seconddecision circuit 513, the second selection circuit 514 selects thesecond error concealment processing circuit 516. In case of receipt ofthe speech encoded data from the second decision circuit 513, the secondselection circuit outputs the speech encoded data to the second decodingcircuit 517.

The second error concealment processing circuit 516 outputs the speechPCM data by error concealment processing. The second decoding circuit517 decodes the speech encoded data, supplied from the second decisioncircuit 513, to output resulting speech PCM data.

The second encoding circuit 518 acquires the speech PCM data, from thesecond error concealment processing circuit 516 or the second decodingcircuit 517, and encodes the so acquired speech PCM data in accordancewith the encoding system as used in the destination of transmission. Thesecond encoding circuit outputs the resulting speech encoded data to thedata multiplexing circuit 900.

FIG. 8 is a flowchart for illustrating the operation for the directionfrom the line-switched network to the packet-switched network for thecase where the speech encoding systems used by the two communicationnetworks differ from each other. Referring to FIGS. 1, 6 and 8, theoperation of the speech data processing circuit 560 will be described.

The first decision circuit 502 of the speech data processing circuit 560of FIG. 6 receives speech encoded data, obtained on demultiplexing fromthe multiplexed data in the multiplexed data demultiplexing circuit 200,and supplied to the speech data processing circuit 560. The firstdecision circuit 502 also counts up the number of speech encoded data,output at every period (steps S31 to S33). The first decision circuit502 has already pre-calculated the number of speech encoded data,expected to be output from the multiplexed data demultiplexing circuit200 at every period. The first decision circuit 502 compares the twonumbers to each other (step S34).

In case the number of the speech encoded data, output per period, iscoincident with the number of the speech encoded data, expected to beoutput from the multiplexed data demultiplexing circuit 200 per period,the first decision circuit 502 outputs all of the speech encoded data,output from the multiplexed data demultiplexing circuit 200 per period,to the first selection circuit 503.

When the number of the speech encoded data, output at every period, isless than the number of the speech encoded data, expected to be acquiredper period, the first decision circuit 502 outputs a generation requestsignal to the effect that a number in deficit of the speech PCM datashall be generated in the first error concealment circuit 505, to thefirst selection circuit 503, along with the encoded speech signalactually acquired (step S36).

In case the number acquired of the speech encoded data, output perperiod, exceeds the number of the speech encoded data, expected to beoutput per period from the multiplexed data demultiplexing circuit 200,the first decision circuit 502 outputs a discarding request signal tothe purport that the speech encoded data in excess shall be discarded,along with the encoded speech signal actually acquired (step S37).

The first selection circuit 503 receives speech encoded data and,together with it, the generation request signal or the discardingrequest signal, as the case may be, from the first decision circuit 502.

If only the speech encoded data has been acquired from the firstdecision circuit 502, the first selection circuit 503 outputs all of thespeech encoded data to the first decoding circuit 506.

In case the first selection circuit 503 has received the encoded speechsignals, along with the generation request signal, from the firstdecision circuit 502, the first selection circuit 503 causes the firsterror concealment circuit 505 to generate a number of the speech PCMdata, corresponding to the number indicated by the generation requestsignal (step S39).

The first selection circuit 503 sends the speech encoded data, receivedfrom the first decision circuit 502, to the first decoding circuit 506.The speech PCM data from the first error concealment circuit 505 isentered, along with the decoded data, output from the first decodingcircuit 506, to the first encoding circuit 507.

The first error concealment circuit 505 is a circuit for outputtingspeech PCM data by error concealment processing. It should be noted thatthe error concealment processing by the first error concealment circuit505 may be a method of using duplicated data of directly previous speechsignal or a method of using error concealment processing provided in thespeech encoding system applied.

On receipt of the discarding request signal, along with the speechencoded data, the first selection circuit 503 discards a number of thespeech encoded data, corresponding to the number indicated by thediscarding request signal, out of the speech encoded data received (stepS40), and sends the speech encoded data, left over, to the firstdecoding circuit 506.

The first decoding circuit 506 decodes the speech encoded data, suppliedfrom the first selection circuit 503, to output the so decoded data asspeech PCM data.

The first encoding circuit 507 receives the speech PCM data, output fromthe first decoding circuit 506 and the first error concealment circuit505, and encodes the speech PCM data in a manner matched to thedestination of transmission, to output the resulting encoded speechsignals (step S42).

The packet data forming circuit 501 receives the speech encoded data,output from the first encoding circuit 507, and converts the speechencoded data into data of the packet format to output the resultingpacket data to the packet-switched network terminating circuit 800 (stepS43).

Thus, in the present second embodiment of the present invention, anumber of the packet data, matched to the period, is similarly sent outfrom the transmission circuit 801 of the packet-switched networkterminating circuit 800, as a result of the above-described sequence ofoperations.

FIG. 9 depicts a flowchart for illustrating the operation for thedirection from the packet-switched network to the line-switched network.The operation of the speech data processing circuit 560 will now bedescribed with reference to FIGS. 1, 7 and 8.

The encoded data extracting circuit 512 acquires the processing startrequest signal, output at a preset period from the second timer circuit511, or the re-acquisition request signal from the second decisioncircuit 513, and makes a trial to get suitable speech data from thereceiving circuit 802 (step S51 to S53). In case the trial to get thespeech data has met success, the encoded data extracting circuitextracts the encoded data to output the so extracted data (step S55). Incase the trial to get the speech data has failed, the encoded dataextracting circuit generates and output a signal indicating that thespeech data has failed to be acquired (step S56).

The second decision circuit 513 receives, from the encoded dataextracting circuit 512, the speech encoded data or the signal to theeffect that acquisition has failed. In case the signal received from theencoded data extracting circuit 512 is the signal to the effect thatacquisition has failed, the second decision circuit 513 outputs ageneration request signal for selecting the second error concealmentprocessing circuit 516 (step S59). In outputting the generation requestsignal in case the signal received from the encoded data extractingcircuit 512 is the signal to the effect that acquisition has failed, thesecond decision circuit 513 is acting on the assumption that theinput/output balance of the buffer provided to the receiving circuit 802has been upset due to delay fluctuations of the packet-switched networkor that packet loss has occurred in the packet-switched network suchthat suitable speech data has failed to be acquired.

If the data acquired by the second decision circuit 513 is the speechencoded data and the second decision circuit has output no generationrequest signal right before (YES branch of the step S57), the seconddecision circuit outputs the speech encoded data to the second selectioncircuit 514.

If the second decision circuit 513 has issued the generation requestsignal at the time of the previous decision, and the speech encodeddata, currently acquired, is the encoded data which should have beenprocessed at an output timing of the generation request signal, adiscarding request signal, indicating that the speech encoded datashould be discarded, is output, along with the speech encoded data, tothe second selection circuit 514. The second decision circuit 513outputs a re-acquisition request signal to the encoded data extractingcircuit 512, for requesting the speech encoded data again (step S60).

It is necessary to avoid such a case in which the discarding requestsignal and the re-acquisition request signal are generated alternatelyin a repeated fashion thus leading to continuous outputting of thespeech encoded data which are obtained from the second encoding circuit518 from the speech PCM data from the second error concealmentprocessing circuit 516. Thus, the second decision circuit 513 includes aresetting function for avoiding this case from occurring.

The second selection circuit 514 acquires the speech encoded data and,together with it, the generation request signal or the discardingrequest signal, supplied from the second decision circuit 513. In casethe signal received from the second decision circuit 513 is thegeneration request signal, the second selection circuit 514 selects thesecond error concealment processing circuit 516. In case the signalreceived from the second decision circuit 513 is the speech encodeddata, the second selection circuit outputs the speech encoded data tothe second decoding circuit 517.

The second error concealment processing circuit 516 outputs speech PCMdata by error concealment processing (step 64).

The second decoding circuit 517 decodes the speech encoded data suppliedfrom the second decision circuit 513 to output speech PCM data (step65).

As for the processing in the second error concealment processing circuit516, similarly to that in the first error concealment circuit 505, anysuitable known techniques, such as a method of using directly previousspeech data or a method of using error concealment processing providedin the speech encoding system applied, may be used.

The second encoding circuit 518 acquires the speech PCM data from thesecond error concealment processing circuit 516 or the decoding circuit517 and executes encoding (step S66). The second encoding circuit 518then outputs the resulting speech encoded data to the data multiplexingcircuit 900.

The operation of the downstream side components, that is, the datamultiplexing circuit 900 and the line-switched network terminatingcircuit, is similar to that of the first embodiment, and hence isdispensed with. The above-described sequence of operations accounts forthe operation of the present invention for the different speech encodingsystems.

It should be noted that the circuit configuration for the processingmethod for speech encoded data is merely illustrative such thatequivalent operations may also be achieved by other circuitconfigurations

The above-described embodiment has been described on the basis of thegateway apparatus having the functions of processing the speech and theimages. However, the present invention is not to be limited to thisconfiguration. For example, the present invention may be applied to agateway apparatus adapted for only speech communication. FIG. 10 showsthe configuration of a third embodiment of the present invention. Theconfiguration of the gateway apparatus, shown in FIG. 10, is theconfiguration of FIG. 1 from which the image data processing circuit 400and the packet-switched network image data terminating circuit 700 areremoved. The multiplexed data demultiplexing circuit 200 demultiplexesthe received data into control data and speech data which are suppliedto a control data processing circuit 300 and to a speech data processingcircuit 550 (560), respectively. The data multiplexing circuit 900outputs data, multiplexed from the control data from the control dataprocessing circuit 300, and the speech data from the speech dataprocessing circuit 550 (560), to the line-switched network terminatingcircuit 100. In other respects, the present embodiment is similar inconfiguration and operation to the above-described first or secondembodiment and hence the explanation is dispensed with.

In the present embodiment, described above, insofar as the directionfrom the line-switched network to the packet-switched network isconcerned, the number of the speech encoded data actually acquired fromthe multiplexed data demultiplexing circuit 200 operating at a presetperiod per period is compared to the number of speech encoded dataexpected to be output per period from the multiplexed datademultiplexing circuit 200 per period as calculated from the period andthe frame time duration of the speech encoding system of interest. Basedon the result of comparison, suitable decision processing is carried outand the processing for generating encoded data or the discardingprocessing is selected by selecting processing. This renders it possibleto provide for a constant number of speech packet data per period and tomaintain short delay for speech communication as deterioration of thespeech quality in the destination terminal of transmission is suppressedto a minimum.

In the present embodiment, if, in the direction from the packet-switchednetwork to the line-switched network, packet delay is caused by delayfluctuations in the packet-switched network is produced, an outputindicating that speech data has failed to be acquired is output from theencoded data extraction processing to carry out proper decision. Byselective processing, the processing for generating encoded data isselected, or discarding processing is carried out, whereby the samemeritorious effects as those for the direction from the line-switchednetwork to the packet-switched network may be achieved. Moreover, withthe present embodiment, short signal delay may be attained asdeterioration in the signal quality is suppressed. It should be notedthat, while the present invention is applied with advantage tointerconnection of the line-switched network and the packet-switchednetwork, the present invention may also be applied to interconnection ofother different types of the networks. Although the present inventionhas so far been described with reference to the preferred embodiments,the present invention is not limited to the particular configurations ofthese embodiments. It will be appreciated that the present invention mayencompass various changes or corrections such as may readily be arrivedat by those skilled in the art within the scope and the principle of theinvention.

1. A gateway apparatus for conducting connection between a firstcommunication network and a second communication network of respectivedifferent types, said apparatus comprising: decision means for decidingon whether data from at least one of said first and second communicationnetworks has been delayed in arrival or lost based on at least one ofthe following events (i) and (ii): (i) comparing the number of encodeddata actually acquired in a preset period and the number of encoded dataexpected to be acquired in said period, and determining that data hasbeen delayed in arrival or lost when there is a difference between thenumber of data acquired and the number of data expected to be acquired,and (ii) attempting to acquire the encoded data in a preset period and,when the attempt to acquire encoded data has failed, determining thatthe data has been delayed in arrival or lost, wherein the acquired datais the same as the data acquired in a previous period; and control meansfor performing control so that, if the result of said decision indicatesthat the data from at least one of said first and second communicationnetworks has been delayed in arrival or lost, data for causing adestination terminal of transmission on the other communication networkto execute error concealment processing is generated when the number ofdata actually acquired is less than the number of data expected to beacquired or data acquired is discarded when the number of data actuallyacquired exceeds the number of data expected to be acquired.
 2. Thegateway apparatus according to claim 1 wherein said first communicationnetwork is a line-switched network; and said second communicationnetwork is a packet-switched network; and wherein said apparatuscomprises: first decision means for deciding on whether encoded datafrom said line-switched network has been delayed in arrival or lost; andfirst control means for performing control so that, if the result ofsaid decision indicates that said encoded data has been delayed inarrival or lost, encoded data for causing a destination terminal oftransmission on said packet-switched network to execute errorconcealment processing is generated when the number of data actuallyacquired is less than the number of data expected to be acquired or theencoded data acquired is discarded when the number of data actuallyacquired exceeds the number of data expected to be acquired.
 3. Thegateway apparatus according to claim 2, wherein said decision meanscomprises: second decision means for deciding on whether encoded datafrom said packet-switched network has been delayed in arriving or lost;and second control means for performing control so that, if the resultof said decision indicates that the encoded data from said line-switchednetwork has been delayed in arrival or lost, encoded data for causing adestination terminal of transmission on the side of said line-switchednetwork to execute error concealment processing is generated when thenumber of data actually acquired is less than the number of dataexpected to be acquired, or the encoded data delayed in arrival isdiscarded when the number of data actually acquired exceeds the numberof data expected to be acquired.
 4. The gateway apparatus according toclaim 1, wherein said first communication network is a line-switchednetwork; and said second communication network is a packet-switchednetwork; and wherein said decision means comprises: second decisionmeans for deciding on whether encoded data from said packet-switchednetwork has been delayed in arriving or lost; and second control meansfor performing control so that, if the result of said decision indicatesthat the encoded data from said line-switched network has been delayedin arrival or lost, encoded data for causing a destination terminal oftransmission on the side of said line-switched network to execute errorconcealment processing is generated when the number of data actuallyacquired is less than the number of data expected to be acquired, or theencoded data delayed in arrival is discarded when the number of dataactually acquired exceeds the number of data expected to be acquired. 5.A gateway apparatus for conducting connection between a firstcommunication network and a second communication network of respectivedifferent types, said apparatus comprising: second decision means fordeciding on whether the encoded data from a packet-switched network hasbeen delayed in arrival or lost; second control means for performingcontrol so that, if the result of decision indicates that the encodeddata from said line-switched network has been delayed in arrival orlost, data is generated by error concealment processing when the numberof data actually acquired is less than the number of data expected to beacquired, or the acquired encoded data is discarded when the number ofdata actually acquired exceeds the number of data expected to beacquired; second decoding means for decoding the encoded data from saidpacket-switched network, as processed by said second control means, andfor outputting the resulting decoded data; and second encoding means forencoding the data obtained from said error concealment processing fromsaid second control means and said decoded data from said seconddecoding means in accordance with an encoding system different from theencoding system for said encoded data from said packet-switched network,wherein said first communication network is a line-switched network, andwherein said second communication network is said packet-switch network.6. A gateway apparatus for conduction between a first communicationnetwork and a second communication network of respective differenttypes, said apparatus comprising: first decision means for deciding onwhether the encoded data from a line-switched network has been delayedin arrival or lost; first control means for performing control so that,if the result of decision indicates that the encoded data from saidline-switched network has been delayed in arrival or lost, data isgenerated by error concealment processing when the number of dataacquired is less than the number of data expected to be acquired, or theacquired encoded data is discarded when the number of data acquiredexceeds the number of data expected to be acquired; first decoding meansfor decoding the encoded data from said line-switched network, asprocessed by said first control means, and for outputting the resultingdecoded data; first encoding means for encoding the data obtained fromsaid error concealment processing from said first control means and saiddecoded data from said first decoding means in accordance with anencoding system different from the encoding system for said encoded datafrom said line-switched network; second decision means for deciding onwhether the encoded data from a packet-switched network has been delayedin arrival or lost; second control means for performing control so that,if the result of decision indicates that the encoded data from saidpacket-switched network has been delayed in arrival or lost, data isgenerated by error concealment processing when the number of dataacquired is less than the number of data expected to be acquired, or theacquired encoded data is discarded when the number of data acquiredexceeds the number of data expected to be acquired; second decodingmeans for decoding the encoded data from said packet-switched network,as processed by said second control means, and for outputting theresulting decoded data; and second encoding means for encoding the dataobtained from said error concealment processing from said second controlmeans and said decoded data from said second decoding means inaccordance with an encoding system different from the encoding systemfor said encoded data from said packet-switched network, wherein saidfirst communication network is said line-switched network, and whereinsaid second communication network is said packet-switch network.
 7. Amethod for processing encoded data by a gateway apparatus for conductingconnection between a first communication network and a secondcommunication network of respective different types, said methodcomprising: (a) a step of said gateway apparatus deciding on whetherdata from at least one of said first and second communication networkshas been delayed in arriving or lost based on at least one of thefollowing events (i) and (ii): (i) comparing the number of encoded dataactually acquired in a preset period and the number of encoded dataexpected to be acquired in said period, and determining that data hasbeen delayed in arrival or lost when there is a difference between thenumber of data acquired and the number of data expected to be acquired,and (ii) attempting to acquire the encoded data in a preset period and,when the attempt to acquire encoded data has failed, determining thatthe data has been delayed in arrival or lost, wherein the acquired datais the same as the data acquired in a previous period; and (b) a step ofsaid gateway apparatus generating data for causing a destinationterminal of transmission to execute error concealment processing whenthe number of data actually acquired is less than the number of dataexpected to be acquired or discarding encoded data acquired when thenumber of data actually acquired exceeds the number of data expected tobe acquired, in case the result of said decision indicates that datafrom at least one of said first and second communication networks hasbeen delayed in arrival or lost.
 8. The method for processing encodeddata by a gateway apparatus according to claim 7, wherein said firstcommunication network is a line-switched network and said secondcommunication network is a packet-switched network; said method furthercomprising: (a1) a step of said gateway apparatus deciding on whetherencoded data from said line-switched network has been delayed in arrivalor lost; and (b1) a step of said gateway apparatus generating encodeddata for causing a destination terminal of transmission to execute errorconcealment processing when the number of data actually acquired is lessthan the number of data expected to be acquired or discarding encodeddata acquired when the number of data actually acquired exceeds thenumber of data expected to be acquired in case the result of saiddecision indicates that data from said line-switched network has beendelayed in arrival or lost.
 9. The method for processing encoded data bya gateway apparatus according to claim 8, wherein said firstcommunication network is a packet-switched network and said secondcommunication network is a line-switched network; said method furthercomprising: (a2) a step of said gateway apparatus deciding on whetherencoded data from said packet-switched network has been delayed inarrival or lost; and (b2) a step of said gateway apparatus generatingdata for causing a destination terminal of transmission to execute errorconcealment processing when the number of data actually acquired is lessthan the number of data expected to be acquired or discarding encodeddata acquired when the number of data actually acquired exceeds thenumber of data expected to be acquired, in case the result of saiddecision indicates that the encoded data from said packet-switchednetwork has been delayed in arrival or lost.
 10. The method forprocessing encoded data by a gateway apparatus according to claim 7,wherein said first communication network is a packet-switched networkand said second communication network is a line-switched network; saidmethod further comprising: (a2) a step of said gateway apparatusdeciding on whether encoded data from said packet-switched network hasbeen delayed in arrival or lost based on at least one of the followingevents (i) and (ii): (i) comparing the number of encoded data actuallyacquired in a preset period and the number of encoded data expected tobe acquired in said period, and determining that data has been delayedin arrival or lost when there is a difference between the number of dataacquired and the number of data expected to be acquired, and (ii)attempting to acquire the encoded data in a preset period and, when theattempt to acquire encoded data has failed, determining that the datahas been delayed in arrival or lost, wherein the acquired data is thesame as the data acquired in a previous period; and (b2) a step of saidgateway apparatus generating data for causing a destination terminal oftransmission to execute error concealment processing when the number ofdata actually acquired is less than the number of data expected to beacquired or discarding encoded data acquired when the number of dataactually acquired exceeds the number of data expected to be acquired, incase the result of said decision indicates that the encoded data fromsaid packet-switched network has been delayed in arrival or lost.
 11. Amethod for processing encoded data by a gateway apparatus for conductingconnection between a first communication network and a secondcommunication network of respective different types, said methodcomprising: (a1) a step of said gateway apparatus deciding on whetherencoded data from a line-switched network has been delayed in arrival orlost; and (b1) a step of said gateway apparatus generating data by errorconcealment processing when the number of data acquired is less than thenumber of data expected to be acquired or discarding encoded dataacquired when the number of data acquired exceeds the number of dataexpected to be acquired, in case the result of said decision indicatesthat the encoded data from said line-switched network has been delayedin arriving or lost; (c1) a step of said gateway apparatus decodingencoded data from said line-switched network, processed in said step(b1) and outputting the resulting decoded data; and (d1) a step of saidgateway apparatus encoding the data obtained by said error concealmentprocessing and said decoded data in accordance with an encoding systemdifferent from that for encoded data from said line-switched network andoutputting the resulting data, wherein said first communication networkis said line-switched network; and wherein said second communicationnetwork is a packet-switched network.
 12. A method for processingencoded data by a gateway apparatus for conducting connection between aline-switched network and a packet-switched network, wherein a dataprocessing circuit for receiving and processing data output from amultiplexed data demultiplexing circuit demultiplexing multiplexed datafrom said line-switched network for outputting packet data viatransmission circuit to said packet-switched network, includes: (A1) astep of receiving and counting encoded data output from said multiplexeddata demultiplexing circuit demultiplexing multiplexed data receivedfrom said line-switched network and comparing the number of the encodeddata acquired per period with an expected value, that is, the number ofencoded data expected to be output per period from said multiplexed datademultiplexing circuit; (A2) a step of outputting, if the result ofcomparison indicates that the number of the encoded data acquired isequal to the number of said expected value, the encoded data receivedfrom said multiplexed data demultiplexing circuit; outputting, if saidresult of comparison indicates that the number of the encoded dataacquired is less than the number of said expected value, a generationrequest signal for generating data in deficit, along with said encodeddata acquired; and outputting, if said result of comparison indicatesthat the number of the encoded data acquired is greater than the numberof said expected value, a discarding request signal for discarding theencoded data in excess, along with said encoded data acquired; (A3) astep of outputting said encoded data unchanged if, as a result ofdecision of the above step (A2), only said encoded data has been output;giving a command to create data in deficit if said generation requestsignal has been output; and discarding, in case of receipt of saiddiscarding request signal, a number of received encoded data indicatedby the number indicated by said discarding request signal, andoutputting the remaining portions of the encoded data; (A4) a step ofgenerating encoded data for causing a destination terminal oftransmission to execute error concealment processing, in case said step(A3) has output a command for formulating data in deficit; and (A5) astep of converting the encoded data output from said step (A3) or theencoded data for error concealment processing, output from said step(A4), into packet data, and outputting the resulting packet data to saidtransmission circuit.
 13. A method for processing encoded data by agateway apparatus for conducting connection between a line-switchednetwork and a packet-switched network, wherein a data processing circuitfor receiving packet data from a receiving circuit receiving packet datafrom said packet-switched network, for extracting encoded data and foroutputting the encoded data extracted, to said line-switched network viaa data multiplexing circuit, includes: (B1) a step of making a trial toget packet data from said receiving circuit at a time moment of receiptof a processing start request signal output from a timer at a presetperiod, or a re-acquisition request signal, extracting encoded data fromsaid packet data if said attempt of acquiring packet data from saidreceiving circuit has met with success, and outputting a signal to theeffect that packet data has failed to be acquired if said trial hasfailed; (B2) a step of outputting a generation request signal for havinga terminal of the destination of the line-switched network execute errorconcealment processing in case a signal to the effect that packet datahas failed to be acquired has been output from said encoding dataextracting processing of said step (B1), outputting the encoded datareceived from said encoded data extracting processing, if encoded datahas been output from said encoded data extracting processing and nogeneration request signal has been output right before, outputting, ifthe result of decision for the present indicates that said generationrequest signal has been output and the encoded data output from theencoded data extracting circuit processing is the encoded data whichshould be processed at an output timing of said generation requestsignal, a discarding request signal, along with said encoded data, saiddiscarding request signal indicating that said encoded data shall bediscarded, and outputting a re-acquisition request signal for requestingagain encoded data to said encoded data extracting processing; (B3) astep of outputting, if encoded data only has been output from said step(B2), said encoded data output; issuing a command to execute encodeddata extracting processing if the generation request signal has beenoutput from said step (B2), and deleting only relevant portions of saidencoded data if the discarding request signal has been output from saidstep (B2), and outputting remaining portions of the encoded data; (B4) astep of generating encoded data needed for a destination terminal oftransmission on the line-switched network to execute error concealmentprocessing; and (B5) a step of sending the encoded data, output fromsaid step (B3), or the encoded data, output from said step (B4), viasaid multiplexed data demultiplexing circuit to said line-switchednetwork.
 14. A method for processing encoded data by a gateway apparatusfor conducting connection between a line-switched network and apacket-switched network and re-encoding input encoded data in accordancewith another encoding system to output the resulting re-encoded data,wherein a data processing circuit packetizing data obtained onre-encoding encoded data of the first encoding system, demultiplexed bysaid multiplexed data demultiplexing circuit, in accordance with anotherencoding system, and outputting the resulting packetized data via atransmission circuit to said packet-switched network, includes: (A1) astep of receiving and counting encoded data output from said multiplexeddata demultiplexing circuit and comparing the number of the encoded dataacquired per period with an expected value, that is, the number ofencoded data expected to be output per period from said multiplexed datademultiplexing circuit, (A2) a step of outputting, if the result ofcomparison indicates that the number of the encoded data acquired isequal to the number of said expected value, the encoded data receivedfrom said multiplexed data demultiplexing circuit; outputting, if saidresult of comparison indicates that the number of the encoded dataacquired is less than the number of said expected value, a generationrequest signal for generating data in deficit; and outputting, if saidresult of comparison indicates that the number of the encoded dataacquired is greater than the number of said expected value, a discardingrequest signal for discarding the encoded data in excess; (A3) a step ofoutputting said encoded data if, as a result of decision of the step(A2), only said encoded data has been output; giving a command to createdata in deficit if said generation request signal has been output fromsaid step (A2); and discarding, in case of receipt of said discardingrequest signal from said step (A2), a number of received encoded datacorresponding to the number indicated by said discarding request signal,and outputting the remaining portions of the encoded data; (A4) a stepof decoding the encoded data output from said step (A3) and outputtingthe resulting decoded step; a step of (A5) a step of outputting encodeddata of an amount indicated by said generation request signal, saidencoded data generated by error concealment processing, based on acommand output from said step (A3); (A6) a step of encoding the decodeddata generated by said step (A4) or the data generated in said step(A5), in accordance with said second encoding system, to outputresulting data; and (A7) a step of converting the data, encoded withsaid second encoding system, into packet data and outputting theresulting packet data to said transmission circuit.
 15. A method forprocessing encoded data by a gateway apparatus for conducting connectionbetween a line-switched network and a packet-switched network andre-encoding input encoded data in accordance with another encodingsystem to output the resulting re-encoded data, wherein a dataprocessing circuit receiving packet data from a receiving circuitreceiving packet data from said packet-switched network, extractingencoded data encoded in accordance with a second encoding system,re-encoding the extracted encoded data with a second encoding system,and outputting the resulting re-encoded data via data multiplexingcircuit to said line-switched network, includes: (B1) a step making atrial to get packet data from said receiving circuit at a time moment ofreceipt of a processing start request signal from a timer circuit, or ofa re-acquisition request signal entered, and extracting the encodeddata, encoded in accordance with said second encoding system, from saidpacket data, if said trial has met with success, and outputting a signalto the effect that packet data has failed to be acquired, if the trialof acquiring packet data from said receiving circuit has failed, by wayof executing encoded data extracting processing; (B2) a step ofoutputting a generation request signal for causing a destinationterminal of transmission of the line-switched network to execute errorconcealment processing in case an signal to the effect that packet datahas failed to be acquired is output from said encoded data extractionprocessing of said step (B1); receiving the encoded data output fromsaid encoded data extraction processing and outputting said encoded datareceived from said encoded data extracting processing if said encodeddata extraction processing has failed to output said generation requestsignal right before; and outputting, if the result of previous decisionindicates that the generation request signal has already been outputfrom said encoded data extracting processing and the encoded data outputfrom said encoded data extracting processing for the present is theencoded data which should be processed at an output timing of saidgeneration request signal, said encoded signal and, together therewith,a discarding request signal indicating that said encoded data shall bediscarded, and outputting a re-acquisition request signal for requestingagain the encoded data to said encoded data extracting processing; (B3)a step of outputting, if said encoded data only is output from said step(B2), said encoded data output; issuing a command for executing errorconcealment processing if said generation request signal is output fromsaid step (B2), and deleting relevant portions of the encoded dataoutput, as the remaining portions of the encoded data is output, in casethe discarding request signal has been output from said step (B2); (B4)a step of outputting data by error concealment processing based on acommand from said step (B3); (B5) a step of decoding the encoded dataoutput from the step (B3) to output the resulting decoded data; (B6) asecond encoding step of encoding the decoded data from said step (B5) orthe data obtained by said error concealment processing of said step (B4)in accordance with the first encoding system on the destination oftransmission, and outputting the resulting encoded data; and (B7) a stepof sending the encoded data of said first encoding system via said datamultiplexing circuit to said line-switched network.
 16. A gatewayapparatus for conducting connection between a line-switched network anda packet-switched network, comprising: a controller which compares thenumber of encoded data actually acquired in a preset period from saidline-switched network, with an expected value, that is, the number ofencoded data expected to be acquired in said period, generates encodeddata, if the result of comparison indicates that the number of theencoded data actually acquired is less than said expected value, andwhich discards excess portions of the encoded data acquired if theresult of comparison indicates that the number of the encoded dataactually acquired is greater than said expected value, such that anumber of the encoded data equal to said expected value per period arepacketized, for performing control to maintain constant the number ofthe packet data sent to said packet-switched network per period.